import {ref,watch} from 'vue'

export default function useTitle(titleValue){
    const title=ref(titleValue)

    watch(title,newVal=>{
        document.title=newVal
    },{
        immediate:true
    })

    return {
        title
    }
}